var tagMenu;
var imageGallery;
var about;

$(document).ready(function() {
    tagMenu = new TagMenu();
    tagMenu.load();

    imageGallery = new ImageGallery();

    about = new AboutInfo();
    about.load();

    tagMenu.onTagSelected(function(tag) {
        if (tag == "about") {
            imageGallery.showGallery(about.buildElement());
        } else {
            imageGallery.loadImagesForTag(tag);
        }
    });

    imageGallery.showInitialGallery();
    setTimeout(function() { window.scrollTo(0, 1); }, 2000);
});

